﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace  Microsoft.Xna.Framework
{
    public static class VectorExtension
    {
        /// <summary>
        /// 获取代表向量的Vector2的相对水平方向的角度
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        public static float Angle(this Vector2 v)
        {
            return (float)Math.Atan2(v.Y, v.X);
        }
    }
}
